package com.qys.livesMall.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qys.livesMall.shop.modal.dto.*;
import com.qys.livesMall.shop.modal.entity.ShopOrderInfo;
import com.qys.livesMall.shop.modal.query.QueryOrder;
import com.qys.livesMall.shop.modal.query.QueryShopAnchorOrderDto;
import com.qys.livesMall.shop.modal.query.QueryShopOrderListDto;
import com.qys.livesMall.shop.modal.query.QueryShopSalesDto;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gmx
 * @since 2023-06-19
 */
public interface ShopOrderInfoMapper extends BaseMapper<ShopOrderInfo> {

    Page<OrderSkuDto> queryOrderSku(Page<OrderSkuDto> page,@Param("data") QueryOrder data);
    Page<ShopOrderListDto> queryShopInfoId(Page<ShopOrderListDto> page, @Param("data") QueryShopOrderListDto data);
    Page<ShopOrderDto> queryOrderInfo(Page<ShopOrderDto> page, @Param("data") QueryShopOrderDto data);
    Page<ShopOrderInfo> queryOrderList(Page<ShopOrderDto> page, @Param("data") QueryOrder data);
    Page<ShopAnchorOrderDto> queryOrderSkuWithAnchorInfo(Page<ShopAnchorOrderDto> page, @Param("data") QueryShopAnchorOrderDto data);
    Page<ShopSalesDto> queryOrderShop(Page<ShopSalesDto> page, @Param("data") QueryShopSalesDto data);

    Integer getOrderNum(@Param("shopId")Long shopId, @Param("startTime")LocalDateTime startTime,@Param("endTime")LocalDateTime endTime);

    Integer getGoodsNum(@Param("shopId")Long shopId, @Param("startTime")LocalDateTime startTime,@Param("endTime")LocalDateTime endTime);

    List<ShopOrderInfo> getOrderYesterday();
}
